<?php
use Yii\helpers\Html;
use yii\helpers\Url;
use backend\components\SideNavWidget;
?>
<div class="col-md-2">
    <?php
    //左侧菜单1
    $menuItem1 = [];
    if ($access = Yii::$app->params['access']) {
        isset($access['OPERATE']['INDEX']) && $menuItem1[] = ['label' => '资讯管理', 'url' => ['/operate/index']];
        isset($access['OPERATE']['LABEL']) && $menuItem1[] = ['label' => '资讯标签管理', 'url' => ['/operate/label']];
        isset($access['OPERATE']['COMMENT']) && $menuItem1[] = ['label' => '资讯评论管理', 'url' => ['/operate/comment']];
    } else {
        $menuItem1 = [
            ['label' => '资讯管理', 'url' => ['/operate/index']],
            ['label' => '资讯标签管理', 'url' => ['/operate/label']],
            ['label' => '资讯评论管理', 'url' => ['/operate/comment']],
        ];
    }
    
    
    echo SideNavWidget::widget([
        'options' => ['class' => 'list-group'],
        'items' => $menuItem1,
    ]);

    //左侧菜单2
    $menuItem2 = [];
    if ($access = Yii::$app->params['access']) {
        isset($access['OPERATE']['WEBNOTICE']) && $menuItem2[] = ['label' => '网站公告管理', 'url' => ['/operate/webnotice']];
        isset($access['OPERATE']['EDITION']) && $menuItem2[] = ['label' => '编辑区管理', 'url' => ['/operate/edition']];
        isset($access['OPERATE']['DIY']) && $menuItem2[] = ['label' => '自定义页面管理', 'url' => ['/operate/diy']];
        isset($access['OPERATE']['APP']) && $menuItem2[] = ['label' => '移动端内容管理', 'url' => ['/operate/app']];
    } else {
        $menuItem2 = [
            ['label' => '网站公告管理', 'url' => ['/operate/webnotice']],
            ['label' => '编辑区管理', 'url' => ['/operate/edition']],
            ['label' => '自定义页面管理', 'url' => ['/operate/diy']],
            ['label' => '移动端内容管理', 'url' => ['/operate/app']],
        ];
    }

    
    
    echo SideNavWidget::widget([
        'options' => ['class' => 'list-group'],
        'items' => $menuItem2,
    ]);

    //左侧菜单3
    $menuItem3 = [];
    if ($access = Yii::$app->params['access']) {
        isset($access['OPERATE']['COUNT']) && $menuItem3[] = ['label' => '数据统计', 'url' => ['/operate/count']];
    } else {
        $menuItem3 = [
            ['label' => '数据统计', 'url' => ['/operate/count']],
        ];
    }

    echo SideNavWidget::widget([
        'options' => ['class' => 'list-group'],
        'items' => $menuItem3,
    ]);

    
    ?>
</div>